package java_zuoye_2;
import java.util.Random;
import java.util.ArrayList;
public class homework_5 {
	public static void main(String[] arg) {
		ArrayList<Integer> numbers = new ArrayList<Integer>();
		getRandomNumbers(numbers);
		System.out.println(numbers);
	}

	private static void getRandomNumbers(ArrayList<Integer> numbers) {
		Random r = new Random();
	    while (numbers.size() < 6) {
	        int randomNumber = r.nextInt(33);
	        if(numbers.contains(randomNumber)) {
	        	continue;
	        }
	        numbers.add(randomNumber);
	    }
	}
}